// 四情监测仪相关接口
import request from "@/utils/request";
interface requestType {
    type: string | number
}
interface requestResult {
    code: string;
    message: string;
    data: any;
    [key: string]: any;
};
//近14日降雨量
export const getRainfall = () => {
    return request<requestResult>({
        url: '/siqing/queryFourteenRainfall',
        method: 'GET',
    })
}
//累计降雨量
export const getTotalRainfall = (data: any) => {
    return request<requestResult>({
        url: '/siqing/queryAddRainfall',
        method: 'GET',
        data,
    })
}
//土壤温度趋势
export const getSoilTemperatureTrend = (data: any) => {
    return request<requestResult>({
        url: '/siqing/querySoilTemperature',
        method: 'GET',
        data,
    })
}
//土壤湿度趋势
export const getSoilHumidityTrend = (data: any) => {
    return request<requestResult>({
        url: '/siqing/querySoilMoisture',
        method: 'GET',
        data,
    })
}
//土壤氮含量趋势
export const getSoilNitrogenTrend = (data: any) => {
    return request<requestResult>({
        url: '/siqing/querySoilNitrogenContent',
        method: 'GET',
        data,
    })
}
//土壤磷含量趋势
export const getSoilPhosphorusTrend = (data: any) => {
    return request<requestResult>({
        url: '/siqing/querySoilPhosphorusContent',
        method: 'GET',
        data,
    })
}
//土壤钾含量趋势
export const getSoilPotassiumTrend = (data: any) => {
    return request<requestResult>({
        url: '/siqing/querySoilPotassiumContent',
        method: 'GET',
        data,
    })
}

//获取设备基本详情
export const getDeviceBaseData = (data: any) => {
    return request<requestResult>({
        url: '/device/getPumpDeviceById',
        method: 'GET',
        data,
    })
}
//苗情虫情图片列表
export const getImageList = (data: any) => {
    return request<requestResult>({
        url: '/siqing/queryImagePage',
        method: 'POST',
        data,
    })
}
//根据时间查询所有图片
export const getImageByTime = (data: any) => {
    return request<requestResult>({
        url: '/siqing/queryAllImageByTime',
        method: 'POST',
        data,
    })
}

